#ifndef ENEMYS_H
#define ENEMYS_H
#include "snake.h"
#include <QPaintEvent>
#include <QPainter>
#include <iostream>



class Enemys:public Snake
{
public:
    Enemys();
    void deleteLast1();//把最后一个删除便于移动
    void addTop1();//向上加一个方块
    void addDown1();//向下加一个方块
    void addRight1();//向右加一个方块
    void addLeft1();//向左加一个方块

    //电脑蛇
    QList<QRectF> snake1;
    //电脑蛇

    int nextgo1(int Hx, int Hy, int Fx, int Fy, QList<QRectF> snake1, QList<QRectF> snake);//下一步往哪里走

    int distance1[4];//方向数组

};

#endif // ENEMYS_H

